#ifndef _QUEUE1_H
#define _QUEUE1_H

#include "common.h"

// define by user
#define MAX_QSIZE 64
typedef struct{
	int key;
	int data;
}Item;

typedef struct node{
	Item item;
	struct node *next;
}Node;
//
typedef struct {
	Node *front;
	Node *rear;
	int len;
}Queue;

void createQueue(Queue *pq);
BOOL qIsFull(Queue *pq);
BOOL qIsEmpty(Queue *pq);
int queue_length(Queue *pq);
BOOL enItem(Queue *pq,const Item item);
BOOL deItem(Queue *pq,Item *pitem);
void destroyQueue(Queue *pq);

#endif // #ifndef _QUEUE1_H

